package choice_test;

import java.util.Scanner;

public class java_chapter3_exexrcise_3 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("input month:");
		int month = in.nextInt();
		System.out.println("choose cangwei:");
		String cangwei = in.next();
		if (month >= 4 && month <= 10) {
			if (cangwei.equals("头等舱")) {
				System.out.println("price is:"+5000*0.9);
			}
			else if(cangwei.equals("商务舱")) {
				System.out.println("price is:"+5000*0.8);
			}
			else {
				System.out.println("price is"+5000*0.7);
			}
		}
		else {
			if (cangwei.equals("头等舱")) {
				System.out.println("price is:"+5000*0.5);
			}
			else if(cangwei.equals("商务舱")) {
				System.out.println("price is:"+5000*0.4);
			}
			else {
				System.out.println("price is"+5000*0.3);
			}
		}
	}

}
